home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / asm32.zip / E32.ZIP / BOTTOM.ASM < prev    next >
Assembly Source File  |  1995-01-05  |  981b  |  57 lines

  1. ; BOTTOM.ASM for E32 - Copyright (C) 1994 Douglas Herr
  2. ;  all rights reserved
  3.  
  4. ;
  5. ; this moves the cursor to the bottom of the file
  6. ;
  7.  
  8. include    model.inc
  9.  
  10. public    bottom
  11. extrn    locate:near
  12. ;extrn    home:near
  13. extrn    rowcount:near
  14.  
  15. include    dataseg.inc
  16. extrn    filesiz:dword        ; file size
  17. extrn    dirty_bits:byte
  18. extrn    left_margin:word
  19. extrn    rows:byte
  20. extrn    cursor:dword
  21. extrn    count_rows:byte, saved_pos:word
  22. extrn    count_start:dword
  23. extrn    count_bytes:dword
  24. extrn    display_mode:byte
  25.  
  26. @curseg    ends
  27.  
  28. include    codeseg.inc
  29. bottom    proc    near
  30.  
  31.     push    ds
  32.     pop    es
  33. ; update count_start
  34.     mov    eax,cursor
  35.     mov    count_start,eax
  36.     mov    left_margin,0    ; set window to start of line
  37.  
  38.     mov    esi,filesiz
  39.     mov    dh,rows
  40.     or    dirty_bits,1    ; redraw screen
  41.     call    locate
  42.     mov    al,display_mode
  43.     test    al,al
  44.     jnz    exit        ; done if hex display mode
  45.  
  46.     mov    saved_pos,-1
  47.     mov    eax,cursor
  48.     sub    eax,count_start
  49.     mov    count_bytes,eax
  50.     call    rowcount
  51. exit:
  52.     ret
  53. bottom    endp
  54.  
  55. @curseg    ends
  56.     end
  57.